package org.jmetrix.jmx.mbean.et;

import org.jmetrix.et.ExecutionTimeAggregator;

/**
 * @author Konstantin Kuzmin
 * @version $Revision$
 * @since 06.10.11
 */
public class ExecutionTimeMXBeanImpl implements ExecutionTimeMXBean { //Do not extend the ExecutionTimeAggregator to hide public aggregate() method
    private ExecutionTimeAggregator aggregator;

    public ExecutionTimeMXBeanImpl(ExecutionTimeAggregator aggregator) {
        this.aggregator = aggregator;
    }

    @Override
    public Long getMin() {
        return aggregator.getMin();
    }

    @Override
    public Long getMax() {
        return aggregator.getMax();
    }

    @Override
    public Long getTotal() {
        return aggregator.getTotal();
    }

    @Override
    public long getCount() {
        return aggregator.getCount();
    }

    @Override
    public Double getAverage() {
        return aggregator.getAverage();
    }

    @Override
    public void reset() {
        aggregator.reset();
    }
}

